$(function() {
	$("#add_coupon_form").validate({
		errorPlacement:function(error, element) {
		element.parent().find(".verror").html(error);
		},
		rules: {
			"coupon.couponNo": {
				required: true
			},
			"coupon.couponName": {
				required: true
			},
			"coupon.equivalence": {
				required: true,
			},
			"coupon.effectiveDate": {
				required: true,
			},
			"coupon.futileDate": {
				required: true,
			},
			"coupon.status": {
				required: true,
			},
		},
		messages: {
			"coupon.couponNo": {
				required: "不能为空,且只能为数字！"
			},
			"coupon.couponName": {
				required: "不能为空"
			},
			"coupon.equivalence": {
				required: "不能为空,且只能为数字！"
			},
			"coupon.effectiveDate": {
				required: "不能为空"
			},
			"coupon.futileDate": {
				required: "不能为空"
			},
			"coupon.status": {
				required: "不能为空"
			}
		}
	});
});
